package com.aiyige.page.interest.edituserinterest.adapter;

import android.view.View;
import android.widget.TextView;

import com.aiyige.R;
import com.aiyige.page.interest.model.Interest;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.LinkedList;

import butterknife.BindView;
import butterknife.ButterKnife;


public class InterestAdapter extends BaseQuickAdapter<Interest, InterestAdapter.ViewHolder> {

    public InterestAdapter() {
        super(R.layout.edit_user_interest_page_interest_item, new LinkedList<Interest>());
    }

    @Override
    protected void convert(ViewHolder helper, Interest item) {
        helper.bindData(item);
    }


    public class ViewHolder extends BaseViewHolder {
        @BindView(R.id.titleTv)
        TextView titleTv;
        Interest data;

        public ViewHolder(View view) {
            super(view);
            ButterKnife.bind(this, view);
        }

        public void bindData(Interest data) {
            this.data = data;
            titleTv.setText(data.getTitle());
        }
    }
}
